package com.example.compreshensiveshop.controller;

import com.example.compreshensiveshop.service.ai.IAiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ai")
public class AiChatController {
    @Autowired
    private IAiService aiService;
    @GetMapping("/highChat")
    public String highModel(@RequestParam(value = "message", defaultValue = "你好") String message) {
        String result = aiService.chat(message);
        System.out.println(result);
        return result;
    }
}
